package com.youuvs.controller;

import com.youuvs.domain.Store;
import com.youuvs.mapper.StoreMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/store")
@RestController
public class StoreController {
    @Autowired
    private StoreMapper storeMapper;

    @GetMapping("/getById/{id}")
    public Store getById(@PathVariable("id") Long id){
        return storeMapper.getById(id);
    }

    @PostMapping("/sto/insert")
    public void insert(@RequestBody Store store){
        storeMapper.insert(store);
    }

}
